from pydantic import BaseModel
from datetime import datetime
from typing import Optional
class UserRecordCreate(BaseModel):
    material_id: Optional[int] = None
    page_number: Optional[int] = None

class UserRecordResponse(UserRecordCreate):
    id: Optional[int] = None
    created_at: Optional[datetime] = None
    updated_at: Optional[datetime] = None

    class Config:
        from_attributes = True

class PageRecordCreate(UserRecordCreate):
    stone: bool = False
    created_at: Optional[datetime] = None
